#ifndef BSP_MYIIC_H
#define BSP_MYIIC_H
#include <stdint.h>

enum {
	I2C_SOFT_MODE = 0,
	I2C_DMA_MODE,
	I2C_IRQ_MODE,
};

#define USE_IC_MODE I2C_IRQ_MODE

#if USE_IC_MODE == I2C_SOFT_MODE
void IIC_Init(void);
void IIC_Start(void);
void IIC_Stop(void);
uint8_t IIC_Wait_Ack(void);
void IIC_Ack(void);
void IIC_NAck(void);
void IIC_Send_Byte(uint8_t txd); 
uint8_t IIC_Read_Byte(unsigned char ack);
uint8_t IIC_Read_One_Byte(uint8_t daddr,uint8_t addr);
void IIC_Write_One_Byte(uint8_t daddr,uint8_t addr,uint8_t data);
void IIC_ReadmultiyBytes(uint8_t SlaveAddr,uint8_t RegAddr,uint8_t Len,uint8_t *Buf_Addr);
#endif
#endif
